package cn.com.se.sharepictrue.model;

import cn.com.se.sharepictrue.bean.LoginUserBean;

/**
 * 登录model
 * 对登录信息存储、读取、修改
 * Created by KIDNG on 2015/11/12.
 */
public class LoginModel implements LoginModelImp {
    private LoginUserBean mLoginUserBean;

    public LoginModel(LoginUserBean loginUserBean) {
        mLoginUserBean = loginUserBean;
    }
    public LoginModel() {
        mLoginUserBean = new LoginUserBean();
    }
    @Override
    public void setID(int id) {

    }

    @Override
    public void setPhone(String phone) {
        mLoginUserBean.setPhone(phone);
    }

    @Override
    public void setPassword(String password) {
        mLoginUserBean.setPassword(password);
    }

    @Override
    public int getID() {
        return 0;
    }

    @Override
    public LoginUserBean load(int id) {
        return null;
    }

    @Override
    public LoginUserBean load(String phone) {
       if(mLoginUserBean.getPhone().equals(phone)){
           return mLoginUserBean;
       }
        return null;
    }
}
